# 从键盘输入一些字符，逐个把它们写到磁盘文件上，直到输入一个 # 为止
import os

if __name__ == '__main__':
    while True:
        s = input("请输入：\n")
        if s == "#":
            print("over!")
            break
        with open('1.txt', 'a', encoding='utf-8') as f:
            f.writelines(s + "\n")
